<ion-view view-title="新品广告" class="myworld_newpro_ads">

	<ion-content>
		<div class="list">
			<li class="item item-input">
				<span class="input-label">活动名称：</span>
				<input type="text" placeholder="请输入活动名称" ng-model="scope.name" />
			</li>
			<li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scope.start_time">
				<span class="input-label">开始时间：</span>
				<input type="text" placeholder="请输入开始时间" class="timeLight" ng-class="{'timeNoneInfo':scope.start_time}">{{scope.start_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
			</li>
			<li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scope.end_time">
				<span class="input-label">结束时间：</span>
				<input type="text" placeholder="请输入结束时间" class="timeLight" ng-class="{'timeNoneInfo':scope.end_time}">{{scope.end_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
			</li>
			<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
                    <div class="input-label">品牌：</div>
                    <div class="input-value" ng-click="doSelectBrand()">{{input.brand.name}}</div>
                </div>
			<li class="item item-input">
				分类：
				<div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
                <div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
                <div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
				<i class="icon ion-plus-circled positive  font-1rem-my" on-tap="add_act_type()"></i> &nbsp;
			</li>

			<li class="item item-icon-right padding-5" style="font-size: 0.5rem;" ng-repeat="act_type in act_type">
            <span ng-class="{invisible:$index>0}" style="padding-left: 5px;">已选分类：</span>{{act_type.name}}
            <i class="icon ion-ios-close-outline font-1rem-my assertive" on-tap="del($index)"></i>
        </li>

			<li class="item item-input">
				选择商品：
				<div class="input-value" ng-click="doSelectGoods()">{{scope.goods_select.name}}</div>
				<i class="icon ion-plus-circled positive font-1rem-my" on-tap="add()"></i> &nbsp;
			</li>
			<li class="item padding-0">
				<table border="1" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td>商品名称</td>
						<td>媒体文件上传</td>
						<td>操作</td>
					</tr>
					<tr ng-repeat="goods in scope.goods  track by $index">
						<td class="font-large-my">{{goods.name}}</td>
						<td class="positive font-large-my" on-tap="upload()">上传文件</td>
						<td class="assertive font-large-my" on-tap="reduce($index)">删除</td>
					</tr>
				</table>
			</li>
		</div>

		<div class="button-bar padding">
			<button class="button  button-assertive" on-tap="tui()">取消</button>
			<button class="button  button-positive col-offset-10" on-tap="ads()">保存</button>
		</div>
	</ion-content>
</ion-view>